package com.yyge.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yyge.controller.admin.orders.req.OrdersReq;
import com.yyge.controller.admin.orders.resp.OrdersResp;
import com.yyge.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【orders(订单表)】的数据库操作Mapper
* @createDate 2023-07-02 20:36:22
* @Entity com.yyge.entity.Orders
*/
@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {

    String searchByMerchandiserName(String orderNumber);

    /**
     * 分页查询
     * @param req
     * @return
     */
    List<OrdersResp> search(@Param(value = "req") OrdersReq req);

    /**
     * 统计订单状态
     * @param status  状态
     * @param merchantId 商家ID
     * @return
     */
    int ordersStatistic(@Param(value = "status") String status, @Param(value = "merchantId") Long merchantId);
}





